package com.lex.data.admin.service.impl;

import com.lex.data.admin.mapper.LexSysLoginLogMapper;
import com.lex.data.admin.model.LexSysLoginLog;
import com.lex.data.admin.service.MyLexSysLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

@Service
public class MyLexSysLoginServiceImpl implements MyLexSysLoginService{

    @Autowired
    private LexSysLoginLogMapper lexSysLoginLogMapper;


    @Override
    public void inserLoginInfo(LexSysLoginLog login_log) {
        long now_time = System.currentTimeMillis();
        //转换为时间戳
        Timestamp time = new Timestamp(now_time);
        login_log.setLoginTime(time);
        lexSysLoginLogMapper.insert(login_log);
    }
}
